from artifacts.base.artifacts_impl import *
from artifacts.base.attr_type import AttrType


need_type = Clock
need_main_attr = AttrType.ENERGY
need_less_bonus_attr = [AttrType.CRIT_DMG, AttrType.CRIT_RATE]


def evaluate(artifacts):
    if not (isinstance(artifacts, need_type) and artifacts.main_attr is need_main_attr):
        return False
    for item in need_less_bonus_attr:
        if item not in [bonus_attr.type for bonus_attr in artifacts.bonus_attr_list]:
            return False
    return True
